package org.example.lotterysystem.dao.dataobject;

import com.fasterxml.jackson.databind.ser.Serializers;

import java.util.Date;
import java.util.Objects;

public class WinnerRecordDO extends BaseDO {

    /**
     * 活动id
     */
    private Long activityId;

    /**
     * 活动名称
     */
    private String activityName;

    /**
     * 奖品id
     */
    private Long prizeId;

    /**
     * 奖品名称
     */
    private String prizeName;
    /**
     * 奖品等级
     */
    private String prizeTier;

    /**
     * 中奖者id
     */
    private Long winnerId;

    /**
     * 中奖者姓名
     */
    private String winnerName;

    /**
     * 中奖者邮箱
     */
    private String winnerEmail;

    /**
     * 中奖者电话
     */
    private Encrypt winnerPhoneNumber;

    /**
     * 中奖时间
     */
    private Date winningTime;

    @Override
    public boolean equals(Object object) {
        super.equals(object);
        if (this == object) return true;
        if (object == null || getClass() != object.getClass()) return false;
        WinnerRecordDO that = (WinnerRecordDO) object;
        return Objects.equals(activityId, that.activityId) && Objects.equals(activityName, that.activityName) && Objects.equals(prizeId, that.prizeId) && Objects.equals(prizeName, that.prizeName) && Objects.equals(prizeTier, that.prizeTier) && Objects.equals(winnerId, that.winnerId) && Objects.equals(winnerName, that.winnerName) && Objects.equals(winnerEmail, that.winnerEmail) && Objects.equals(winnerPhoneNumber, that.winnerPhoneNumber) && Objects.equals(winningTime, that.winningTime);
    }

    @Override
    public int hashCode() {
        super.hashCode();
        return Objects.hash(activityId, activityName, prizeId, prizeName, prizeTier, winnerId, winnerName, winnerEmail, winnerPhoneNumber, winningTime);
    }

    public Long getActivityId() {
        return activityId;
    }

    public void setActivityId(Long activityId) {
        this.activityId = activityId;
    }

    public String getActivityName() {
        return activityName;
    }

    public void setActivityName(String activityName) {
        this.activityName = activityName;
    }

    public Long getPrizeId() {
        return prizeId;
    }

    public void setPrizeId(Long prizeId) {
        this.prizeId = prizeId;
    }

    public String getPrizeName() {
        return prizeName;
    }

    public void setPrizeName(String prizeName) {
        this.prizeName = prizeName;
    }

    public String getPrizeTier() {
        return prizeTier;
    }

    public void setPrizeTier(String prizeTier) {
        this.prizeTier = prizeTier;
    }

    public Long getWinnerId() {
        return winnerId;
    }

    public void setWinnerId(Long winnerId) {
        this.winnerId = winnerId;
    }

    public String getWinnerName() {
        return winnerName;
    }

    public void setWinnerName(String winnerName) {
        this.winnerName = winnerName;
    }

    public String getWinnerEmail() {
        return winnerEmail;
    }

    public void setWinnerEmail(String winnerEmail) {
        this.winnerEmail = winnerEmail;
    }

    public Encrypt getWinnerPhoneNumber() {
        return winnerPhoneNumber;
    }

    public void setWinnerPhoneNumber(Encrypt winnerPhoneNumber) {
        this.winnerPhoneNumber = winnerPhoneNumber;
    }

    public Date getWinningTime() {
        return winningTime;
    }

    public void setWinningTime(Date winningTime) {
        this.winningTime = winningTime;
    }
}
